﻿using Application.PurchaseReturn_dService;
using Domain.Entity.ord;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace WMSManage.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]//需要鉴权
    public class PurchaseReturn_dController : ControllerBase
    {
        private readonly IPurchaseReturn_dService purchaseReturn_DService;

        public PurchaseReturn_dController(IPurchaseReturn_dService purchaseReturn_DService)
        {
            this.purchaseReturn_DService = purchaseReturn_DService;
        }


        /// <summary>
        /// 根据purtId查询明细
        /// </summary>
        /// <param name="purtId"></param>
        /// <returns></returns>
        [HttpGet]
        public async Task<List<PurchaseReturn_d>> GetPurchaseReturn_Ds(int purtId)
        {
            return await purchaseReturn_DService.GetPurchaseReturn_Ds(purtId);
        }
    }
}
